package vip.source.pattern.part10.facade;

import org.junit.jupiter.api.Test;

/**
 * @Description: 外观模式测试
 * @Author: zy
 **/
public class UnitTest {
    @Test
    public void test() {
        // 创建子系统对象
        Amplifier amplifier = new Amplifier();
        Projector projector = new Projector();
        DVDPlayer dvdPlayer = new DVDPlayer();

        // 创建外观对象
        HomeTheaterFacade facade = new HomeTheaterFacade(amplifier, projector, dvdPlayer);

        // 使用外观启动电影
        facade.watchMovie("The Shawshank Redemption");
    }

}
